package com.leo.filter;

import org.springframework.web.filter.GenericFilterBean;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @ClassName: MyFilter2
 * @Description: ${description}
 * @Author: leo825
 * @Date: 2020-02-03 17:30
 * @Version: 1.0
 */
@WebFilter(urlPatterns = "/*", filterName = "myFilter2")
public class MyFilter2 extends GenericFilterBean {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("MyFilter2 执行过滤");
        chain.doFilter(request, response);
    }
}
